<template>
  <a-config-provider :locale='locale' :theme="theme">
      <router-view></router-view>
  </a-config-provider>
</template>

<script lang='ts' setup>
  import { ref } from 'vue'
  import zhCN from 'ant-design-vue/es/locale/zh_CN';
  import dayjs from 'dayjs';
  import 'dayjs/locale/zh-cn';
  import { useAuthStore, useSysConfigStore } from './store';


const sysConfigStore = useSysConfigStore()

  const auth = useAuthStore()

  const locale = ref()
  locale.value = zhCN
  dayjs.locale('zh-cn');

  const theme = {
    token : {
      borderRadius : 0,
      fontSize : 12
    }
  }


  if(auth.auth) {
    auth.refresh()
  }

  sysConfigStore.init()

</script>
